package demo_basic.helloTriangle;

public class Testpoint {
	double x, y, z;

	public Testpoint(double _x, double _y, double _z) {
		x = _x;
		y = _y;
		z = _z;
	}

	public void setX(double _x) {
		x = _x;
	}

	public void setY(double _y) {
		y = _y;
	}

	public void setZ(double _z) {
		z = _z;
	}

	public double getX() {
		return x;
	}

	public double getY() {
		return y;
	}

	public double getZ() {
		return z;
	}

	public double getDistance(Testpoint p) {
		double x = getX();
		double y = getY();
		double z = getZ();
		return x * x + y * y + z * z;
	}
}